1. Field of the Invention
The present invention relates to a computer system mounted with a plurality of devices, and more particularly, to an apparatus and a method for managing power in a computer system.
2. Background of the Related Art
FIG. 1 illustrates a configuration of an apparatus for managing power in computer system. In the following description, the ‘power down mode’ refers to all kinds of power modes (i.e. standby, suspend, or power off etc.) except for the power on mode (e.g., normal operation mode). The computer system includes an operation system 10, a device driver 20, a bus driver 30, and devices 40. A power mode for respective devices 40, including a network adaptor, a display adaptor, a mouse, a monitor, a disk drive, a digital camera, a scanner, and a sound card, is collectively determined in accordance with a system power mode that is set up by the operation system 10.
For instance, suppose that the operation system 10 sets up the system power mode to the power down mode. Then, the device driver 20 sets up a power mode for a device it has been operating and controlling to the power down mode. On the other hand, if the operation system 10 sets up the system power mode to an operating mode, the device driver 20 sets up the power mode for the device it has been operating and controlling to the operating mode and supplies power in a normal manner. Thus, the device driver 20 varies the power mode of the device corresponding to the system power mode set up by the operation system 10 to either the operating mode (e.g., D0) or the power down mode (e.g., D1, D2, D3).
For example, the operation system 10 can generate an I/O Request Packet (IRP) that corresponds to the system power mode it has set up, and output the IRP to the device driver 20. Then, the device driver 20 identifies the IRP and generates a Device Power Mode Packet (DPMP) for enabling the power mode of an object (e.g., corresponding) device 40 to the operating mode or the power down mode and outputs the DPMP to the very top end of a driver stack to notify every driver that the device power mode has been changed.
In response to the DPMP, the device 40 operates its hardware and varies the power mode to the power down mode or the operating mode, and transmits the power mode packet to a bus driver 30. The bus driver 30 changes a bus-power mode to the power down mode when every device under a corresponding bus (e.g. PCI, USB, IEEE1394 and the like) is in the power down mode. Hence, when the operation system 10 sets up the system power mode to the power down mode, the power mode of each device changes to the power down mode. In other words, the entire computer system now enters into the power down mode.
As described above, the related art has various disadvantages. In the related art, the power mode for each device is collectively set up in accordance with the system power mode. In other words, once a current system power mode is in the operating mode, every device is in the operating mode. Accordingly, although some of devices might be in an idle state for a prescribed period of time, the power mode for those devices is all in the operating mode. In so doing, a lot of power was consumed unnecessarily and system loading is done ineffectively.